The concept of the SerialPackager is to allow adding/retrieving data to/from a package in a device independent manner. See Getting started.
Extends from Modelica.Icons.Package (Icon for standard packages).| Name | Description |
|---|---|
| Create a package which allows to add signals of various types | |
| Add a Boolean vector to package | |
| Add an Integer array to package | |
| Add a Real vector to package | |
| Cast all elements of Real vector to float and add to package (loss of precision!) | |
| Add String to package | |
| Get Boolean vector from package | |
| Get Integer vector from package | |
| Get Real vector from package | |
| Get float vector from package (all values casted to double before assigning it to Modelica Real array) | |
| Get String from package | |
| Encode (non-negative) integer value at bit level | |
| Unpack integer value encoded at bit level | |
| Set current writing/reading position of package to zero |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.Packager
| Name | Description |
|---|---|
| Advanced | |
| useBackwardPropagatedBufferSize | true, use backward propagated (automatic) buffer size for package (default!), otherwise use manually specified buffer size below |
| userBufferSize | Buffer size for package if backward propagation of buffer size is deactivated |
| Name | Description |
|---|---|
| pkgOut |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.AddBoolean
| Name | Description |
|---|---|
| n |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| u[n] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.AddInteger
| Name | Description |
|---|---|
| n |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| u[n] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.AddReal
| Name | Description |
|---|---|
| n |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| u[n] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.AddFloat
| Name | Description |
|---|---|
| n |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| u[n] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.AddString
| Name | Description |
|---|---|
| bufferSize | Buffer size (in bytes) reserved for String (ensure that same buffer size is used in corresponding GetString block!) |
| data |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.GetBoolean
| Name | Description |
|---|---|
| n |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| y[n] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.GetInteger
| Name | Description |
|---|---|
| n |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| y[n] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.GetReal
| Name | Description |
|---|---|
| n |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| y[n] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.GetFloat
| Name | Description |
|---|---|
| n |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| y[n] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.GetString
| Name | Description |
|---|---|
| bufferSize | Buffer size (in bytes) reserved for String (ensure that same buffer size is used in corresponding AddString block!) |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.PackUnsignedIntegerCurrently, the pack block only supports Intel-Endiannes (little-endian!).
Extends from Modelica_DeviceDrivers.Utilities.Icons.SerialPackagerWriteIcon, Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.Internal.PartialSerialPackager.
| Name | Description |
|---|---|
| bitOffset | Bit offset from current packager position until first encoding bit |
| width | Number of bits that encode the integer value |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| u | Only postive (unsigned) values are supported |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.UnpackUnsignedIntegerCurrently, the unpack block only supports Intel-Endiannes (little-endian!).
Extends from Modelica_DeviceDrivers.Utilities.Icons.SerialPackagerReadIcon, Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.Internal.PartialSerialPackager.
| Name | Description |
|---|---|
| bitOffset | Bit offset from current packager position until first encoding bit |
| width | Number of bits that encode the integer value |
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] | |
| y |
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.ResetPointer
| Name | Description |
|---|---|
| pkgIn | |
| pkgOut[nu] |